//---------------------------------------------------------------------
// <copyright file="CsdlNavigationProperty.cs" company="Microsoft">
//      Copyright (c) Microsoft Corporation.  All rights reserved.
// </copyright>
//---------------------------------------------------------------------

namespace Microsoft.Data.Edm.Csdl.Internal.Parsing.Ast
{
    /// <summary>
    /// Represents a CSDL navigation property.
    /// </summary>
    internal class CsdlNavigationProperty : CsdlNamedElement
    {
        private readonly string relationship;
        private readonly string toRole;
        private readonly string fromRole;
        private readonly bool containsTarget;

        public CsdlNavigationProperty(string name, string relationship, string toRole, string fromRole, bool containsTarget, CsdlDocumentation documentation, CsdlLocation location)
            : base(name, documentation, location)
        {
            this.relationship = relationship;
            this.toRole = toRole;
            this.fromRole = fromRole;
            this.containsTarget = containsTarget;
        }

        public string Relationship
        {
            get { return this.relationship; }
        }

        public string ToRole
        {
            get { return this.toRole; }
        }

        public string FromRole
        {
            get { return this.fromRole; }
        }

        public bool ContainsTarget
        {
            get { return this.containsTarget; }
        }
    }
}
